/*
 * @Date: 2022-09-16 09:20:00
 * @LastEditTime: 2022-09-16 09:23:02
 */
import Layout from '@/layout'
export const Routes = [
  {
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  },

  {
    path: '/404',
    component: () => import('@/views/404'),
    hidden: true
  },

  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children: [
      {
        path: 'dashboard',
        name: 'Dashboard',
        component: () => import('@/views/dashboard/index'),
        meta: { title: '首页', icon: 'dashboard' }
      },
    ]
  },
  
  
]

export const AllAsyncRoutes = [
  {
    path:'/product',
    name:'ATest111',
    component:() => import('@/layout/index.vue'),
    meta:{
      title:'ATest',
      icon:'el-icon-s-goods'
    },
    children:[
      {
        path:'trademark/list',
        component:() => import('@/views/product/trademark/index.vue'),
        meta:{
          title:'Test1'
        },
        name:'TestTrademark1'
      },
      {
        path:'attr/list',
        component:() => import('@/views/product/attr/index.vue'),
        meta:{
          title:'Test222222'
        },
        name:'ATest2wwwwww'
      },
      {
        path:'sku/list',
        component:() => import('@/views/product/sku/index.vue'),
        meta:{
          title:'Test3'
        },
        name:'ATest3'
      },
      {
        path:'spu/list',
        component:() => import('@/views/product/spu/index.vue'),
        meta:{
          title:'Test4'
        },
        name:'ATest4'
      }
    ]
  },
  {
    path: "/acl",
    name: "Acl",
    component: () => import("@/layout/index.vue"),
    redirect: "/acl/user/list",
    meta: {
      title: "权限管理",
      icon: "el-icon-s-tools",
    },
    children: [
      {
        name: "User",
        path: "/acl/user/list",
        component: () => import("@/views/acl/user/index.vue"),
        meta: {
          title: "用户管理",
        },
      },
      {
        name: "Role",
        path: "/acl/role/list",
        component: () => import("@/views/acl/role/index.vue"),
        meta: {
          title: "角色管理",
        },
      },
      
      {
        name: "Permission",
        path: "/acl/permission/list",
        component: () => import("@/views/acl/permission/index.vue"),
        meta: {
          title: "菜单管理",
        },
      },
    ],
  },
  {
    path:'/change',
    name:'Change',
    component:() =>import('@/layout/index.vue'),
    redirect: "/acl/test/list",
    meta:{
      title:'改变',
      icon: "el-icon-s-tools"
    },
    children:[
      {
        path:'/change/test1/list',
        name:'ChangeTest1',
        component:() => import('@/views/change/changeTest1/index.vue'),
        meta:{
          title:'改变测试1'
        }
      },
      {
        path:'/change/test2/list',
        name:'ChangeTest2',
        component:() => import('@/views/change/changeTest2/index.vue'),
        meta:{
          title:'改变测试2'
        }
      },
      {
        path:'/change/test3/list',
        name:'ChangeTest3',
        component:() => import('@/views/change/changeTest3/index.vue'),
        meta:{
          title:'改变测试3'
        }
      }
    ]
  }
]

export const AnyRoute = [
  { path: '*', redirect: '/404', hidden: true },
]